FROM python:3.11-slim

# install node and npm
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get update && apt-get install -y nodejs

RUN apt-get install vim -y

COPY src/crawler.egg-info/requires.txt .

RUN pip install --upgrade pip

RUN pip install -r requires.txt

RUN mkdir -p /usr/local/app

WORKDIR /usr/local/app

COPY build/lib /usr/local/app

CMD ["python3", "/usr/local/app/crawler"]